/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.model.objects;

import android.graphics.Color;

/**
 * <p>This class represents the rectangle resource that allows a view to be filled with a solid color, and optionally,
 * display a solid border. It is a simple JavaBean (POJO) that provides getters and setters for all private attributes
 * and performs no argument validation in the setters.</p>
 *
 * <p><strong>Thread safety:</strong> This class is mutable and not thread safe.</p>
 *
 * @author saarixx, jmn
 * @version 1.0
 */
public class XRERectangle extends XREResource {

    /**
     * <p>The color used to fill the rectangle. Defaults to white (#FFFFFFFF).</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private int color = Color.WHITE;

    /**
     * <p>The color used for the border. Defaults to black (#FF000000).</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private int borderColor = Color.BLACK;

    /**
     * <p>The thickness to be used for the border, in pixels.</p>
     *
     * <p>Can be any value.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private double borderThickness;

    /**
     * <p>Creates new instance of {@link XRERectangle} class.</p>
     */
    public XRERectangle() {
        // empty constructor
    }

    /**
     * <p>Retrieves the color used to fill the rectangle.</p>
     *
     * @return the color used to fill the rectangle
     */
    public int getColor() {
        return color;
    }

    /**
     * <p>Sets the color used to fill the rectangle.</p>
     *
     * @param color the color used to fill the rectangle
     */
    public void setColor(int color) {
        this.color = color;
    }

    /**
     * <p>Retrieves the color used for the border.</p>
     *
     * @return the color used for the border
     */
    public int getBorderColor() {
        return borderColor;
    }

    /**
     * <p>Sets the color used for the border.</p>
     *
     * @param borderColor the color used for the border
     */
    public void setBorderColor(int borderColor) {
        this.borderColor = borderColor;
    }

    /**
     * <p>Retrieves the thickness to be used for the border, in pixels.</p>
     *
     * @return the thickness to be used for the border, in pixels
     */
    public double getBorderThickness() {
        return borderThickness;
    }

    /**
     * <p>Sets the thickness to be used for the border, in pixels.</p>
     *
     * @param borderThickness the thickness to be used for the border, in pixels
     */
    public void setBorderThickness(double borderThickness) {
        this.borderThickness = borderThickness;
    }
}

